package com.mf.entity.request.upload;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传请求
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FileUploadFileReq {
    // 整个文件的md5
    @NotBlank(message = "md5不能为空")
    @Schema(description = " 整个文件的md5")
    private String md5;



    @Schema(description = " 切片索引-从0开始")
    private Integer sliceIndex;

    @Schema(description = "总切片索引")
    private Integer totalIndex;

    @Schema(description = "文件，如果是分片就是每个块文件")
    @NotNull(message = "文件不能为空！")
    private MultipartFile file;

    @Schema(description = "是否分片-0：否，1：是")
    @NotNull(message = "是否分片不能为空！")
    private Integer isSlice;

    @Schema(description = "文件后缀")
    private String fileSuffix;

    @Schema(description = "文件类型")
    private String fileType;

    @Schema(description = "文件区域")
    private String fileArea;

    @Schema(description = "文件绑定id")
    private String fileBindId;

    @NotBlank(message = "桶不能为空！")
    private String bucketName;
}
